#!/bin/sh

echo -n  "Is it morning? Please answer yes or no "
read timeofday


    
if   [ "$timeofday" = "yes" ]; then
    echo "Good morning"
elif [ "$timeofday" = "no" ]; then
    echo "Good afternoon"
else 
    while [ "$timeofday" != "yes" ]&&[ "$timeofday" != "no" ];do
	echo "Sorry, $timeofday not recognized. Enter yes or no"
	read timeofday
    done
    if   [ "$timeofday" = "yes" ]; then
	echo "Good morning"
    elif [ "$timeofday" = "no" ]; then
	echo "Good afternoon"
    fi
    
fi


exit 0
